package com.ruoyi;

import com.ruoyi.common.security.annotation.EnableCustomConfig;
import com.ruoyi.common.security.annotation.EnableRyFeignClients;
import com.ruoyi.common.swagger.annotation.EnableCustomSwagger2;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.actuate.autoconfigure.security.servlet.ManagementWebSecurityAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.retry.annotation.EnableRetry;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
 * 监测数据模块
 * 启动类的位置(主要是注解中的Bean扫描目录basePackages)会影响SpringBean的加载路径
 * 	当前目录下的Bean和这些Bean引用的其他Bean
 * 	比如com.ruoyi.eqmonitor.RuoYiEquipmentMonitorApplication不会主动引用com.ruoyi.common下的Bean
 * @author ruoyi
 */
//@EnableCaching //启用缓存注解
@EnableCustomConfig
@EnableCustomSwagger2
@EnableRyFeignClients
@EnableRetry(proxyTargetClass=true) // 启用重试
@EnableScheduling // 启用定时任务
@SpringBootApplication(exclude = {
		RabbitAutoConfiguration.class,
		SecurityAutoConfiguration.class,
        ManagementWebSecurityAutoConfiguration.class
})
public class EquipmentMonitorApplication {

    public static void main(String[] args) {

        SpringApplication.run(EquipmentMonitorApplication.class, args);
        System.out.println("EQUIPMENT-MONITOR STARTED SUCCESS");
    }
}
